package com.googlecode.c4e.api.model;

import java.util.List;

public class ProjectGroup {

	private Server server;
	private int id;
	private String name;
	private String groupId;
	private String description;
	private List<Project> projects;

	public void setServer(Server server) {
		this.server = server;
	}

	public Server getServer() {
		return server;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setProjects(List<Project> projects) {
		this.projects = projects;
	}

	public List<Project> getProjects() {
		return projects;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public String toString() {
		if (description == null || description.trim().length() == 0) {
			return "Group: " + name;
		} else {
			return "Group: " + description;
		}
	}
}
